from abaqusConstants import *
from abaqusGui import *
from kernelAccess import mdb, session
import os

thisPath = os.path.abspath(__file__)
thisDir = os.path.dirname(thisPath)


###########################################################################
# Class definition
###########################################################################

class TCNTsimu_ver2024DB(AFXDataDialog):

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    def __init__(self, form):

        # Construct the base class.
        #

        AFXDataDialog.__init__(self, form, 'TCNTjob',
            self.OK|self.CANCEL, DIALOG_ACTIONS_SEPARATOR)
            

        okBtn = self.getActionButton(self.ID_CLICKED_OK)
        okBtn.setText('OK')
            
        GroupBox_1 = FXGroupBox(p=self, text='TCNTmodel', opts=FRAME_GROOVE)
        fileName = os.path.join(thisDir, 'TCNTmodel300.png')
        icon = afxCreatePNGIcon(fileName)
        FXLabel(p=GroupBox_1, text='', ic=icon)
        VAligner_1 = AFXVerticalAligner(p=GroupBox_1, opts=0, x=0, y=0, w=0, h=0,
            pl=0, pr=0, pt=0, pb=0)
        AFXTextField(p=VAligner_1, ncols=12, labelText='model name', tgt=form.model_nameKw, sel=0)
        AFXTextField(p=VAligner_1, ncols=12, labelText='job name', tgt=form.job_nameKw, sel=0)
        AFXTextField(p=VAligner_1, ncols=12, labelText='TT Length', tgt=form.tube_lenKw, sel=0)
        AFXTextField(p=VAligner_1, ncols=12, labelText='Rotate deg', tgt=form.degreeKw, sel=0)
        GroupBox_2 = FXGroupBox(p=self, text='T1', opts=FRAME_GROOVE)
        HFrame_1 = FXHorizontalFrame(p=GroupBox_2, opts=0, x=0, y=0, w=0, h=0,
            pl=0, pr=0, pt=0, pb=0)
        AFXTextField(p=HFrame_1, ncols=12, labelText='D', tgt=form.T1_DKw, sel=0)
        AFXTextField(p=HFrame_1, ncols=12, labelText='t', tgt=form.T1_tKw, sel=0)
        GroupBox_3 = FXGroupBox(p=self, text='T2', opts=FRAME_GROOVE)
        HFrame_2 = FXHorizontalFrame(p=GroupBox_3, opts=0, x=0, y=0, w=0, h=0,
            pl=0, pr=0, pt=0, pb=0)
        AFXTextField(p=HFrame_2, ncols=12, labelText='D', tgt=form.T2_DKw, sel=0)
        AFXTextField(p=HFrame_2, ncols=12, labelText='t', tgt=form.T2_tKw, sel=0)
        GroupBox_4 = FXGroupBox(p=self, text='T3', opts=FRAME_GROOVE)
        HFrame_3 = FXHorizontalFrame(p=GroupBox_4, opts=0, x=0, y=0, w=0, h=0,
            pl=0, pr=0, pt=0, pb=0)
        l = FXLabel(p=HFrame_3, text='D autoComputed', opts=JUSTIFY_LEFT)
        AFXTextField(p=HFrame_3, ncols=12, labelText='t', tgt=form.T3_tKw, sel=0)
        GroupBox_5 = FXGroupBox(p=self, text='plate', opts=FRAME_GROOVE)
        HFrame_4 = FXHorizontalFrame(p=GroupBox_5, opts=0, x=0, y=0, w=0, h=0,
            pl=0, pr=0, pt=0, pb=0)
        AFXTextField(p=HFrame_4, ncols=12, labelText='b', tgt=form.rect_bKw, sel=0)
        AFXTextField(p=HFrame_4, ncols=12, labelText='h', tgt=form.rect_hKw, sel=0)
